import { _decorator, Component, Node, BoxColliderComponent, ModelComponent } from "cc";
const { ccclass, property } = _decorator;

@ccclass("Block")
export class Block extends Component {
    /* class member could be defined like this */
    // dummy = '';

    /* use `property` decorator if your want the member to be serializable */
    // @property
    // serializableDummy = 0;
    private _BoxComponent: BoxColliderComponent = null;
    onLoad(){
        this._BoxComponent = this.node.getComponent(BoxColliderComponent);
        this._BoxComponent.enabled = false;
    }

    start () {
        // Your initialization goes here.
    }

    update (deltaTime: number) {
        // if(this.node.activeInHierarchy){

        // }
        // let visibility = this._BoxComponent.node.getComponent(ModelComponent).;
        // this._BoxComponent.enabled = ;
        // cc.log(visibility);
        ;
        // cc.log(this.node.activeInHierarchy);
    }
}
